package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.annotation.OperLog;
import com.ytjj.qmyx.admin.constants.SysLogConstants;
import com.ytjj.qmyx.admin.service.DrawBedService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 *
 *
 * @Version: 1.0
 */
@RestController
@RequestMapping("/drawBed")
public class DrawBedController {

	@Resource
	private DrawBedService drawBedService;

	@GetMapping("insert")
	@OperLog(operModule = "图床管理", operDesc = "新增图片", operType = SysLogConstants.OPERATION_ADD)
	public CommonResult addDrawBed(@RequestParam String name, @RequestParam String url) {
		return CommonResult.success(drawBedService.addDrawBed(name, url));
	}
}
